home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2000 February
/
PCWorld_2000-02_cd.bin
/
Software
/
Servis
/
FFE
/
MOD.SWG
/
0062_SA2 or SAdT Mod Format.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1997-05-11
|
3KB
|
83 lines
File Format: Page 16
------------
Have you ever wondered how the files are built up? Well. here is the
file formats I use:
Offset Length (Bytes) Description
----------------------------------------------------------------------
0 4 'SAdT' These for bytes mark a Song.
4 1 Version number (currently 9)
5 465 The 31 Instruments
470 496 The 31 Instrument names
966 128 Patternorder
1094 2 Number of Patterns (NoP)
1096 1 Length of Song
1097 1 Restart Position
1098 2 BPM
1100 256 Arpeggiolist
1356 256 Arpeggiocommands
1612 576 Trackorder
2188 2 Aktive Channels Bits: 123456789xxxxxxx
2190 ???*192 Trackdata
Trackorder is an 64*9 array that points to the tracks.
Track 0 is a empty track (not saved).
each track is saved as follows:
64 lines of:
nnnnnnni iiiieeee ppppPPPP = 3 Bytes
(where n indicates a bit for the note,
i indicates a bit for the instruments,
e indicates a bit for the effect and
p/P indicates the effect-parameter bits.)
therefore 64*3 = 192 Bytes.
The Instrument Format: Page 17
Offset Length (Bytes) Description
-----------------------------------------------------------------------
0 11 Instrumentdata
11 4 Arpeggiodata
O.K. here's how the instrument data is built up:
Byte 1:
Bit 0: Frequenzy modulation / additiv synthesis
Bits 1-3: Feedback
Byte 2:
Bits 0-3: Freq. Multiplier ─┐
Bit 4: Scaling │
Bit 5: Sustaining Sound ├ Connector
Bit 6: Vibrato │
Bit 7: Amp. Vibrato ─┘
Byte 3:
just like Byte 2, just for the Carrier
Byte 4:
Bits 0-3: Decay Rate
Bits 4-7: Attack Rate Connector
Byte 5
Decy, Attack Carrier
Byte 6
Bits 0-3: Release Rate
Bits 4-7: Sustain Level Connector
Byte 7
Release, Sustain level Carrier
Byte 8
Waveform Connector
Byte 9
Waveform Carrier
Byte 10
Bits 0-5: Volume
Bits 6-7: Level Scaling Connector
Byte 11
Volume, Level Scaling Carrier
The Arpeggiodata consists of:
ArpeggioStart, ArpeggioSpeed, CurrentPos, SpeedCount, each value is a
byte long.